// 正式
// export const URL = 'https://www.sqkjkj.vip/index.php'
export const URL = 'http://xcx.itcwc.com'
export const URL_PAY = 'https://yzf.sqkjkj.vip'
// 本地开发环境下使用代理URL避免跨域
export const URL_PAY_PROXY = process.env.NODE_ENV === 'development' ? '/api-pay-proxy' : URL_PAY
// 测试
// export const URL = 'http://bjg.tanjirj.com/index.php'


export const time = function(timestamp) {

	let date = new Date(timestamp * 1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000

	let Y = date.getFullYear() + '/';

	let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';

	let D =  date.getDate()  + ' ';

	let h =  date.getHours()  + ':';

	let m =  date.getMinutes()+ 1 < 10 ? '0' + (date.getMinutes()) : date.getMinutes() + '';

	let s = date.getSeconds() ;

	return Y + M + D + h + m ;

}
export const times = function(timestamp) {

	let date = new Date(timestamp * 1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000

	let Y = date.getFullYear() + '/';

	let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';

	let D = date.getDate() + ' ';

	let h = date.getHours() + ':';

	let m = date.getMinutes()+ 1 < 10 ? '0' + (date.getMinutes()) : date.getMinutes() + '';

	let s = date.getSeconds();

	return M + D + h + m ;

}